<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CPP11ThreadPool: Runnable类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="CPP.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CPP11ThreadPool
   </div>
   <div id="projectbrief">C++11线程池</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="classRunnable-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Runnable类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> interface 重写operator()或传进lambda  
 <a href="classRunnable.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="runnable_8hpp_source.html">runnable.hpp</a>&gt;</code></p>
<div class="dynheader">
类 Runnable 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="classRunnable__inherit__graph.png" border="0" usemap="#Runnable_inherit__map" alt="Inheritance graph"/></div>
<map name="Runnable_inherit__map" id="Runnable_inherit__map">
<area shape="rect" id="node2" href="structTimerTask.html" title="定时任务封装 " alt="" coords="5,80,89,107"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">图例</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:abe8d3066c7305401d6f0aad8e70780f2"><td class="memItemLeft" align="right" valign="top"><a id="abe8d3066c7305401d6f0aad8e70780f2"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#abe8d3066c7305401d6f0aad8e70780f2">sptr</a> = std::shared_ptr&lt; <a class="el" href="classRunnable.html">Runnable</a> &gt;</td></tr>
<tr class="memdesc:abe8d3066c7305401d6f0aad8e70780f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">std::shared_ptr&lt;Runnable&gt;别名 <br /></td></tr>
<tr class="separator:abe8d3066c7305401d6f0aad8e70780f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ab052afa8b53dd1e7c28e978962839446"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
<tr class="memitem:ab052afa8b53dd1e7c28e978962839446"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classRunnable.html#ab052afa8b53dd1e7c28e978962839446">Runnable</a> (F &amp;&amp;f)</td></tr>
<tr class="memdesc:ab052afa8b53dd1e7c28e978962839446"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> 构造函数  <a href="#ab052afa8b53dd1e7c28e978962839446">更多...</a><br /></td></tr>
<tr class="separator:ab052afa8b53dd1e7c28e978962839446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d6ce997a7873530a2f339412e6c4935"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a6d6ce997a7873530a2f339412e6c4935">Runnable</a> (<a class="el" href="classRunnable.html">Runnable</a> &amp;&amp;rh)</td></tr>
<tr class="memdesc:a6d6ce997a7873530a2f339412e6c4935"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> 复制构造  <a href="#a6d6ce997a7873530a2f339412e6c4935">更多...</a><br /></td></tr>
<tr class="separator:a6d6ce997a7873530a2f339412e6c4935"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e4d88b5d30d6e0368c5d22a0df203ee"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a9e4d88b5d30d6e0368c5d22a0df203ee">Runnable</a> (<a class="el" href="classRunnable.html">Runnable</a> &amp;rh)</td></tr>
<tr class="memdesc:a9e4d88b5d30d6e0368c5d22a0df203ee"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> 拷贝构造不会复制functor_  <a href="#a9e4d88b5d30d6e0368c5d22a0df203ee">更多...</a><br /></td></tr>
<tr class="separator:a9e4d88b5d30d6e0368c5d22a0df203ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a572b61c98700ada8d241b122ddc80e2c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classRunnable.html">Runnable</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a572b61c98700ada8d241b122ddc80e2c">operator=</a> (<a class="el" href="classRunnable.html">Runnable</a> &amp;&amp;rh)</td></tr>
<tr class="memdesc:a572b61c98700ada8d241b122ddc80e2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">operator= 复制  <a href="#a572b61c98700ada8d241b122ddc80e2c">更多...</a><br /></td></tr>
<tr class="separator:a572b61c98700ada8d241b122ddc80e2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dca857ef9f64534673170bc3c8b72a1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classRunnable.html">Runnable</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a4dca857ef9f64534673170bc3c8b72a1">operator=</a> (<a class="el" href="classRunnable.html">Runnable</a> &amp;rh)</td></tr>
<tr class="memdesc:a4dca857ef9f64534673170bc3c8b72a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">operator= 复制  <a href="#a4dca857ef9f64534673170bc3c8b72a1">更多...</a><br /></td></tr>
<tr class="separator:a4dca857ef9f64534673170bc3c8b72a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5769222dcc4b2adca7723bfbdfa00cbb"><td class="memItemLeft" align="right" valign="top"><a id="a5769222dcc4b2adca7723bfbdfa00cbb"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a5769222dcc4b2adca7723bfbdfa00cbb">Runnable</a> ()=default</td></tr>
<tr class="memdesc:a5769222dcc4b2adca7723bfbdfa00cbb"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> 默认构造 <br /></td></tr>
<tr class="separator:a5769222dcc4b2adca7723bfbdfa00cbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08557328273d2dfd3425507b1f972fcb"><td class="memItemLeft" align="right" valign="top"><a id="a08557328273d2dfd3425507b1f972fcb"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a08557328273d2dfd3425507b1f972fcb">~Runnable</a> ()=default</td></tr>
<tr class="memdesc:a08557328273d2dfd3425507b1f972fcb"><td class="mdescLeft">&#160;</td><td class="mdescRight">~Runnable 析构函数 <br /></td></tr>
<tr class="separator:a08557328273d2dfd3425507b1f972fcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38bf849dab4bbb86fc5bc6e7aff383e0"><td class="memItemLeft" align="right" valign="top"><a id="a38bf849dab4bbb86fc5bc6e7aff383e0"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a38bf849dab4bbb86fc5bc6e7aff383e0">operator()</a> ()</td></tr>
<tr class="memdesc:a38bf849dab4bbb86fc5bc6e7aff383e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">operator() 重载实现操作 <br /></td></tr>
<tr class="separator:a38bf849dab4bbb86fc5bc6e7aff383e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3abba14a5cf19709cef2d299ee68acae"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a3abba14a5cf19709cef2d299ee68acae">empty</a> () const</td></tr>
<tr class="memdesc:a3abba14a5cf19709cef2d299ee68acae"><td class="mdescLeft">&#160;</td><td class="mdescRight">empty 判断内部的函数包装器是否为空  <a href="#a3abba14a5cf19709cef2d299ee68acae">更多...</a><br /></td></tr>
<tr class="separator:a3abba14a5cf19709cef2d299ee68acae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a687268c89ddd0d1170687ba764cbc0f2"><td class="memItemLeft" align="right" valign="top"><a id="a687268c89ddd0d1170687ba764cbc0f2"></a>
std::unique_ptr&lt; <a class="el" href="structFunctor__base.html">Functor_base</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRunnable.html#a687268c89ddd0d1170687ba764cbc0f2">functor_</a></td></tr>
<tr class="memdesc:a687268c89ddd0d1170687ba764cbc0f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">函数包装器 <br /></td></tr>
<tr class="separator:a687268c89ddd0d1170687ba764cbc0f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> interface 重写operator()或传进lambda </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ab052afa8b53dd1e7c28e978962839446"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab052afa8b53dd1e7c28e978962839446">&#9670;&nbsp;</a></span>Runnable() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Runnable::Runnable </td>
          <td>(</td>
          <td class="paramtype">F &amp;&amp;&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> 构造函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>lambda </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6d6ce997a7873530a2f339412e6c4935"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d6ce997a7873530a2f339412e6c4935">&#9670;&nbsp;</a></span>Runnable() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Runnable::Runnable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classRunnable.html">Runnable</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>rh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> 复制构造 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">rh</td><td>Runnable右值引用 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9e4d88b5d30d6e0368c5d22a0df203ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e4d88b5d30d6e0368c5d22a0df203ee">&#9670;&nbsp;</a></span>Runnable() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Runnable::Runnable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classRunnable.html">Runnable</a> &amp;&#160;</td>
          <td class="paramname"><em>rh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a> 拷贝构造不会复制functor_ </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">rh</td><td>Runnable引用 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a3abba14a5cf19709cef2d299ee68acae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3abba14a5cf19709cef2d299ee68acae">&#9670;&nbsp;</a></span>empty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Runnable::empty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>empty 判断内部的函数包装器是否为空 </p>
<dl class="section return"><dt>返回</dt><dd>bool true-空 </dd></dl>

</div>
</div>
<a id="a572b61c98700ada8d241b122ddc80e2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a572b61c98700ada8d241b122ddc80e2c">&#9670;&nbsp;</a></span>operator=() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classRunnable.html">Runnable</a>&amp; Runnable::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classRunnable.html">Runnable</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>rh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>operator= 复制 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">rh</td><td>被复制的Runnable</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a>&amp; </dd></dl>

</div>
</div>
<a id="a4dca857ef9f64534673170bc3c8b72a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4dca857ef9f64534673170bc3c8b72a1">&#9670;&nbsp;</a></span>operator=() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classRunnable.html">Runnable</a>&amp; Runnable::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classRunnable.html">Runnable</a> &amp;&#160;</td>
          <td class="paramname"><em>rh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>operator= 复制 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">rh</td><td>被复制的Runnable</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><a class="el" href="classRunnable.html" title="Runnable interface 重写operator()或传进lambda ">Runnable</a>&amp; </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="runnable_8hpp_source.html">runnable.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
